package com.wicket.okrcomponent.integration.dto;

import com.wicket.okrcomponent.common.dto.BaseDto;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.Objects;
import javax.validation.constraints.NotNull;
import lombok.Data;

/**
 * @desc OpenObjectUsageRelationshipDto
 * @使用场景
 */
@Data
public class OpenObjectUsageRelationshipDto
  extends BaseDto
  implements Serializable {

  /**
   * 开通对象使用关系ID
   */
  @ApiModelProperty("开通对象使用关系ID")
  private String applexRelId;

  /**
   * 开通对象钥匙标识 TENANT_SPACE:租户空间 ORG:组织 EVA_THEME:评价主题 EVA_TEMP:评价模板 PLATFORM:平台
   */
  @ApiModelProperty("开通对象钥匙标识")
  private String applexType;

  /**
   * 开通对象ID
   */
  @ApiModelProperty("开通对象ID")
  private String applexId;

  /**
   * 冗余开通对象名称
   */
  @ApiModelProperty("冗余开通对象名称")
  private String applexName;

  @Override
  public boolean equals(Object o) {
    if (this == o) return true;
    if (o == null || getClass() != o.getClass()) return false;
    if (!super.equals(o)) return false;
    OpenObjectUsageRelationshipDto that = (OpenObjectUsageRelationshipDto) o;
    return (
      applexRelId == that.applexRelId &&
      applexType == that.applexType &&
      applexId == that.applexId &&
      applexName == that.applexName
    );
  }

  @Override
  public int hashCode() {
    return Objects.hash(
      super.hashCode(),
      applexRelId,
      applexType,
      applexId,
      applexName
    );
  }

}
